Skip to content

NFS3 and iSCSI automation tests; Fix for NFS Cancel Maintenance#66

Open
sandeeplocharla wants to merge 6 commits into
mainfrom
feature/CSTACKEX-189
Open

NFS3 and iSCSI automation tests; Fix for NFS Cancel Maintenance#66
sandeeplocharla wants to merge 6 commits into
mainfrom
feature/CSTACKEX-189

Conversation

@sandeeplocharla

@sandeeplocharla sandeeplocharla commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR has the following:

  1. Automation tests for NFS3 and iSCSI protocols

    • To run the automation tests follow the below:
      • Run all 10 suites

        bash test/integration/plugins/ontap/run_tests.sh
        

        Run a single suite by tag

        bash test/integration/plugins/ontap/run_tests.sh <tag>
        | Tag | Suite |
        |-----|-------|
        | `nfs3_workflow` | NFS3 pool lifecycle |
        | `nfs3_with_volumes` | NFS3 pool with volumes |
        | `zone_pool` | NFS3 zone-scoped pool |
        | `nfs3_volume` | NFS3 volume lifecycle |
        | `vm_volume_workflow` | NFS3 VM volume attach/detach |
        | `iscsi_workflow` | iSCSI pool lifecycle |
        | `iscsi_with_volumes` | iSCSI pool with volumes |
        | `iscsi_zone_pool` | iSCSI zone-scoped pool |
        | `iscsi_volume` | iSCSI volume lifecycle |
        | `iscsi_vm_workflow` | iSCSI VM volume attach/detach |
        
  2. Fix for Cancel maintenance not functioning properly in case of NFS3

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Copilot AI review requested due to automatic review settings July 15, 2026 10:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a comprehensive Marvin-based integration test suite for the NetApp ONTAP primary storage plugin, covering NFS3 and iSCSI workflows end-to-end (pool lifecycle, volume lifecycle, and VM attach/detach), along with supporting documentation and a convenience runner script.

Changes:

  • Added 10 ONTAP integration test suites (NFS3 + iSCSI) with a shared OntapTestBase + ONTAP REST verification client.
  • Added documentation (README + full test-case matrix) and a run_tests.sh wrapper to execute suites by tag.
  • Added an ontap.cfg configuration file for test environments (needs scrubbing before merge).

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/integration/plugins/ontap/TEST_CASES.md Adds a detailed test-case reference matrix for all ONTAP suites.
test/integration/plugins/ontap/run_tests.sh Adds a tag-driven runner to execute each suite file sequentially and summarize results.
test/integration/plugins/ontap/README.md Documents test layout, prerequisites, configuration, and execution patterns.
test/integration/plugins/ontap/ontap.cfg Provides a Marvin config for ONTAP tests (currently contains real-looking credentials/IPs).
test/integration/plugins/ontap/ontap_test_base.py Introduces shared base class, ONTAP REST client, and common helpers/cleanup.
test/integration/plugins/ontap/init.py Package initializer for the ONTAP test plugin directory.
test/integration/plugins/ontap/nfs3/init.py Package initializer for NFS3 tests.
test/integration/plugins/ontap/nfs3/pool/init.py Package initializer for NFS3 pool suites.
test/integration/plugins/ontap/nfs3/pool/test_pool_lifecycle.py Adds NFS3 pool lifecycle workflow tests and ONTAP-side assertions.
test/integration/plugins/ontap/nfs3/pool/test_pool_with_volumes.py Adds NFS3 pool lifecycle tests with a live volume present (incl. cancel-maintenance behavior checks).
test/integration/plugins/ontap/nfs3/pool/test_zone_scoped_pool.py Adds zone-scoped NFS3 pool tests including host connectivity/export-policy assertions.
test/integration/plugins/ontap/nfs3/volume/init.py Package initializer for NFS3 volume suites.
test/integration/plugins/ontap/nfs3/volume/test_volume_lifecycle.py Adds NFS3 volume lifecycle tests (CS metadata semantics) and negative delete coverage.
test/integration/plugins/ontap/nfs3/instance/init.py Package initializer for NFS3 instance suites.
test/integration/plugins/ontap/nfs3/instance/test_vm_volume_attach.py Adds NFS3 VM + volume attach/detach lifecycle tests.
test/integration/plugins/ontap/iscsi/init.py Package initializer for iSCSI tests.
test/integration/plugins/ontap/iscsi/pool/init.py Package initializer for iSCSI pool suites.
test/integration/plugins/ontap/iscsi/pool/test_pool_lifecycle.py Adds iSCSI pool lifecycle workflow tests and ONTAP-side assertions (igroups, LUNs).
test/integration/plugins/ontap/iscsi/pool/test_pool_with_volumes.py Adds iSCSI pool lifecycle tests with a live volume (LUN) present.
test/integration/plugins/ontap/iscsi/pool/test_zone_scoped_pool.py Adds zone-scoped iSCSI pool tests including igroup assertions.
test/integration/plugins/ontap/iscsi/volume/init.py Package initializer for iSCSI volume suites.
test/integration/plugins/ontap/iscsi/volume/test_volume_lifecycle.py Adds iSCSI volume lifecycle tests (LUN per CS volume) and negative delete coverage.
test/integration/plugins/ontap/iscsi/instance/init.py Package initializer for iSCSI instance suites.
test/integration/plugins/ontap/iscsi/instance/test_vm_volume_attach.py Adds iSCSI VM + volume attach/detach lifecycle tests with LUN-map assertions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +35 to +42
from marvin.cloudstackAPI import (
cancelStorageMaintenance,
createVolume as createVolumeAPI,
deleteStoragePool as deleteStoragePoolAPI,
deleteVolume as deleteVolumeAPI,
listDiskOfferings as listDiskOfferingsAPI,
updateStoragePool as updateStoragePoolAPI,
)
Comment on lines +10 to +13
"url": "http://10.193.56.65",
"username": "root",
"password": "netapp1!"
}
Comment on lines +22 to +26
"dbSvr": "10.193.56.62",
"passwd": "",
"db": "cloud",
"port": 3306,
"user": "root"
Comment on lines +33 to +37
"mgtSvrIp": "10.193.56.62",
"port": 8096,
"user": "admin",
"passwd": "password",
"hypervisor": "kvm"
Comment on lines +41 to +45
"storageIP": "10.196.38.187",
"svmName": "vs0",
"username": "admin",
"password": "netapp1!"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants